<template>
	<view class="">
		<nav-bar :title="title" :autoBack="true"></nav-bar>
		<cnde-lottie ref="cndeLottie" :animation-option="animationOption" :data-json="import('./data.json')" 
		 style='width: 100%;height: 100px;' @click="replay"></cnde-lottie>
		   <button type="default" @click="play">点击激活动画2</button>
		   <button type="default" @click="reset">点击重置动画2</button>
	</view>
</template>

<script>
import animationData2 from "./data.json"
	export default{
		data(){
			return{
				title:'lottie动画',
				animationOption:{
					// animationData:animationData2,
					// autoplay:true
				},
				animationData2:animationData2
			}
		},
		mounted() {
		},
		methods:{
			play(){
				this.$refs.cndeLottie.play()
				// this.$refs.cndeLottie.getLottie().play()
			},
			reset(){
				this.$refs.cndeLottie.reset()
			},
			replay(){
				this.$refs.cndeLottie.replay()
			}
		}
	}
</script>

<style>
</style>
